﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CarHelpDesk.Web.Models.Answer>" %>
<div class="answer<%=(Model.IsCorrect)?"Accepted":"" %>">
    <div class="answer-vote">
        <span id="answer_vote_up_<%=Model.ID %>"  class="vote-icon vote-up" title="гласувай за"
            onclick="VoteForAnswer(<%= Html.Encode(Model.ID) %>,1)"></span>
        
        <span id="answer_rating_<%=Model.ID %>" class="vote-count"><%= Html.Encode(Model.VoteUpCount - Model.VoteDownCount) %></span>
        
        <span id="answer_vote_down_<%=Model.ID %>" class="vote-icon vote-down" title="гласувай против"
            onclick="VoteForAnswer(<%= Html.Encode(Model.ID) %>,-1)"></span>  
    
        <center>
            <span onclick="javascript:markAnswer(<%=Model.ID %>)" id="accept-answer<%=Model.ID %>" class="accept-answer-icon"></span>
        </center>
     
    </div>
    <div>
        <div class="answer-content"> <%= Html.Encode(Model.Content) %></div>
        
        <div>Автор: <%= Html.Encode(Model.aspnet_User.UserName)%></div>
        <div>Дата: <%= Html.Encode(String.Format("{0:g}", Model.CreateDate))%></div>
    </div>
</div>
